﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 第三次作业
{
    public partial class Form2 : Form
    {
        Dictionary<string, int> data = new Dictionary<string, int>();
        public Form2(Dictionary<string,int> dic)
        {
            InitializeComponent();
            data = dic;
            this.BindData();
        }

        void BindData()
        {
            BindingSource bindingSource = new BindingSource();
            bindingSource.DataSource = data;
            dataGridView1.DataSource = bindingSource;


        }
    }
}
